package com.qike.yuandongguoji.enums;

/**
 * 订单来源枚举
 * 类型 0后台1 微信
 */
public enum OrderSourceEnums {
    PC                  (0,"后台"),
    WX                      (1,"企业微信"),
    ;
    private Integer ecode;

    private String emsg;

    OrderSourceEnums(Integer ecode, String emsg) {
        this.ecode = ecode;
        this.emsg = emsg;
    }

    public Integer getEcode() {
        return ecode;
    }

    public String getEmsg() {
        return emsg;
    }

    public static OrderSourceEnums statOf(Integer ecode) {
        for (OrderSourceEnums state : values())
            if (state.getEcode().equals(ecode))
                return state;
        return null;
    }
}
